
<div class="services index">
	<h2><?php echo __('Servicios'); ?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('numservicio','Num Serv'); ?></th>
			<th><?php echo $this->Paginator->sort('car_id','Vehículo'); ?></th>
			<th><?php echo $this->Paginator->sort('descripcion'); ?></th>
			<th><?php echo $this->Paginator->sort('fecha'); ?></th>
			<th><?php echo $this->Paginator->sort('kilometraje'); ?></th>
			<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	<?php
	foreach ($services as $service): ?>
	<tr>
		<td><?php echo h($service['Service']['numservicio']); ?>&nbsp;</td>
		<td>
			<?php	$vehiculo =  $service['Car']['marca'].' '.$service['Car']['modelo']; 
				echo $this->Html->link($vehiculo, array('controller' => 'cars', 'action' => 'view', $service['Car']['id'])); ?>
		</td>
		<td><?php echo h($service['Service']['descripcion']); ?>&nbsp;</td>
		<td><?php echo h(date('d-m-Y', strtotime($service['Service']['fecha']))) ?>&nbsp;</td>
		<td><?php echo h($service['Service']['kilometraje']); ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('Detalles'), array('action' => 'view', $service['Service']['id'])); ?>
			<?php echo $this->Html->link(__('Editar'), array('action' => 'edit', $service['Service']['id'])); ?>
			<?php echo $this->Form->postLink(__('Borrar'), array('action' => 'delete', $service['Service']['id']), null, __('Desea eliminar el servicio?')); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Página {:page} de {:pages}, mostrando {:current} servicios de un total de{:count}, desde {:start}, hasta {:end}')
	));
	?>	</p>

	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
</div>
<div class="actions">
	<h3><?php echo __('Acciones'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Lista vehículos'), array('controller' => 'cars', 'action' => 'index')); ?> </li>
		<li><?php  echo $this->Html->link('Volver',"javascript:history.back()"); ?> </li>
	</ul>
</div>
